package com.leyou.auth.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("auth-service")
public interface AuthClient {

    /**
     * 根据提供的clientId、secret查询是否是合法服务
     * @param clientId 服务id
     * @param secret 密钥
     * @return 生成jwt的key
     */
    @GetMapping("/client/key")
    String getSecretKey(
            @RequestParam("clientId")String clientId,
            @RequestParam("secret")String secret);

}
